//引入config地址
const config = require('../util/config');

const { request } = require('../util/w-request')
//暴露接口
module.exports = {
    reqSever: async ({ _id, url }) => {
        var options = {
            method: 'PATCH',
            uri: `${config['api_server']}/users/${_id}/img/${encodeURIComponent(url)}`,
        }
        return await request(options)
    },
    removeImg: async ({ _id, url }) => {
        var options = {
            method: 'DELETE',
            uri: `${config['api_server']}/users/${_id}/img/${encodeURIComponent(url)}`,
        }
        return await request(options)
    },
}